#include "ConditionImpl.h"

CombinatorCondition* ConditionFactoryImpl::createAndCondition(
										Condition* first,
										Condition* second)
										throw(CSSException)
{
	return new AndConditionImpl(first, second);
}


CombinatorCondition* ConditionFactoryImpl::createOrCondition(
										Condition* first,
										Condition* second)
										throw(CSSException)
{
	throw(CSSException(CSSException::SAC_NOT_SUPPORTED_ERR));
	return NULL;
}

NegativeCondition* ConditionFactoryImpl::createNegativeCondition(
										Condition* condition)
										throw(CSSException)
{
	throw(CSSException(CSSException::SAC_NOT_SUPPORTED_ERR));
	return NULL;
}

PositionalCondition* ConditionFactoryImpl::createPositionalCondition(
										int position, bool typeNode,
										bool type)throw(CSSException)
{
	throw(CSSException(CSSException::SAC_NOT_SUPPORTED_ERR));
	return NULL;
}

AttributeCondition* ConditionFactoryImpl::createAttributeCondition(
										const string& localName,
										const string* namespaceURI,
										bool specified,
										const string& value)
										throw(CSSException)
{
	return new AttributeConditionImpl(localName, value);
}

LangCondition* ConditionFactoryImpl::createLangCondition(const string& Lang)
										throw(CSSException)
{
	return new LangConditionImpl(Lang);
}

AttributeCondition* ConditionFactoryImpl::createOneOfAttributeCondition(
										const string& localName,
										const string* namespaceURI,
										bool specified,
										const string& value)
										throw(CSSException)
{
	return new OneOfAttributeConditionImpl(localName, value);
}

AttributeCondition* ConditionFactoryImpl::createBeginHyphenAttributeCondition(
										const string& localName,
										const string* namespaceURI,
										bool specified,
										const string& value)
										throw(CSSException)
{
	return new BeginHyphenAttributeConditionImpl(localName, value);
}

AttributeCondition* ConditionFactoryImpl::createClassCondition(
										const string* namespaceURI,
										const string& value)
										throw(CSSException)
{
	return new ClassConditionImpl(value);
}

AttributeCondition* ConditionFactoryImpl::createIdCondition(
										const string& value)
										throw(CSSException)
{
	return new IdConditionImpl(value);
}

AttributeCondition* ConditionFactoryImpl::createPseudoClassCondition(
										const string* namespaceURI,
										const string& value)
										throw(CSSException)
{
	return new PseudoClassConditionImpl(value);
}

Condition* ConditionFactoryImpl::createOnlyChildCondition()throw(CSSException)
{
	throw(CSSException(CSSException::SAC_NOT_SUPPORTED_ERR));
	return NULL;
}

Condition* ConditionFactoryImpl::createOnlyTypeCondition()throw(CSSException)
{
	throw(CSSException(CSSException::SAC_NOT_SUPPORTED_ERR));
	return NULL;
}

ContentCondition* ConditionFactoryImpl::createContentCondition(const string& data)
									throw(CSSException)
{
	throw(CSSException(CSSException::SAC_NOT_SUPPORTED_ERR));
	return NULL;
}
